import request from '../utils/request';

//通过外键查询图片信息
export const selectPictureByFkId = query => {
    return request({
        url: '/api/srm/picture/doMain',
        method:'post',
        // url:'./json/selectAllPicture.json',
        // method: 'get',
        params: query
    });
};
//添加一个图片
export const doAddPicture = query => {
    return request({
        url: '/api/srm/picture/doAdd',
        method:'post',
        // url:'./json/true.json',
        // method: 'get',
        data: query,
        timeout: null
    });
};
//更新
export const doUpdatePicture = query => {
    return request({
        url: '/api/srm/picture/doUpdate',
        method: 'post',
        // url: './json/true.json',
        // method: 'get',
        data: query,
        timeout: null
    });
};
/*删除图片*/
export const doDeletePicture = query => {
    return request({
        url: '/api/srm/picture/doDelete',
        method:'post',
        // url:'./json/true.json',
        // method: 'get',
        params: query
    });
};
//查询一个图片的基本信息
export const selectOnePic = query => {
    return request({
        url: '/api/srm/picture/selectById',
        method:'post',
        // url: './json/selectOnePicture.json',
        // method: 'get',
        params: query
    });
};
//展示
export const showPdf = query => {
    return request({
        url: '/api/srm/file/getPdf',
        method: 'post',
        params: query,
        responseType: 'blob',
        headers: {
            'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
        },
    });
};




